<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>事件绑定方法1</title>
</head>
<body>
<button type="button" onclick="myhello()">按钮1</button>
<script>
    function myhello(){
        alert("Hello World!");
    }
</script>
</body>
</html>